import numpy as np
# link
a=np.array([[1,2],
            [3,4]])
b=np.array([[5,6]])
ab=np.concatenate((a,b))
print(ab)
b2=np.stack((b,b))
print(b2)
acb=np.column_stack(a,np.array([1,2]))
print(acb)
bt=b.T
abt=np.concatenate((a,bt),axis=1)
print(abt)
ab=np.vstack((a,b))
print(ab)
abt=np.hstack((a,bt))
print(abt)
abd=np.dstack(a,a)
print(abd)
# split
a1=np.arange(9)
b1=np.split(a1,3)
print(b1)
sections=np.array([4,7])
b1=np.split(a1,sections)
print(b1)
a2=np.array([[1,2,3,4],
            [5,6,7,8],
            [9,10,11,12],
            [13,14,15,16]])
b2=np.split(a2,4)
print(b2)
sections=np.array([1,2])
b1=np.split(a2,sections)
print(b1)
b2=np.split(a2,sections,axis=1)
print(b2)
b3=np.vsplit(a2,4)
print(b3)
b4=np.hsplit(a2,sections)
print(b4)
b5=np.dsplit(np.array([a2]),2)
print(b5)
